<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div>
        <!-- 使用单选框,name命名必须一致 -->
        <h4>请选择性别</h4>
        <p><label for="male" >男:</label><input type="radio" name="sex" id="male"></p>
        <p><label for="female">女:</label><input type="radio" name="sex" id="female"></p>
    </div>
</body>
</html>